import { TestItem } from '../api/mock'

export interface SingleListItem {
  title: string
  img: string
  [key: string]: any
}

export interface DetailItem {
  singleList: SingleListItem[]
  [key: string]: any
}

export interface Category {
  detail: DetailItem
  [key: string]: any
}

export interface TestData {
  MEISHI: TestItem[]
  DIANZI: TestItem[]
  SHOPPING: TestItem[]
  HOTEL: TestItem[]
  SPORT: TestItem[]
  [key: string]: TestItem[]
}

// Add a type guard function to check if an array is TestItem[]
export function isTestItemArray(arr: any[]): arr is TestItem[] {
  return arr.length === 0 || (
    'region' in arr[0] && 
    'img' in arr[0] && 
    'distance' in arr[0]
  )
} 